package shiyl.use.any.helloworld.generic;

/**
 * 对象适配Peer，使Peer具备负载均衡能力
 * 演示范型类
 * @author shiyl
 */
public class PeerLoader implements ILoader<Peer> {

    /**
     * 实际的有效负载处理器
     */
    Peer endpoint;

    public PeerLoader setEndpoint(Peer peer) {
        this.endpoint = peer;
        this.endpoint.getId() ;
        return this ;
    }

    @Override
    public Peer getEndpoint() {
        return this.endpoint;
    }
}
